<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title></title>
		<script type="text/javascript">
			var str = '幸福树上幸福果，幸福树下你和我';
			//var len = str.length;//15
			
//			根据指定位置获取字符
//			var res = str.charAt(5);//福

//			根据指定位置的字符获取相应的unicode编码
//			var res = str.charCodeAt(5);//31119 

			var res = String.fromCharCode(31119);
			document.write(res);
		</script>
	</head>
	<body>

	</body>
</html>
